//
//  Constants.h
//  DiveCalcsApp
//
//  Created by Donald MacKay on 11-04-07.
//  Copyright 2011 __MyCompanyName__. All rights reserved.
//

// Macro for loading floats into an array
#define FBOX(x) [NSNumber numberWithFloat:x]
#define __TESTING__
/**
 * Ratio Deco constants
 */
extern long const kRatioDecoMetricSP;
extern long const kRatioDecoImperialSP;
extern float const kRatioDecoAscTimePerFoot;
extern float const kRatioDecoAscTimePerMeter;


extern float const kFirstAscRateChange;
extern float const kSecondAscRateChange;
extern float const kThirdAscRateChange;

// Formatted Strings for the Dive Profile
extern NSString *const kMinGasText;
extern NSString *const kCNSText;
extern NSString *const kOTUText;

extern NSString *const kUnadjustedDecoText;
extern NSString *const kLastStopText;
extern NSString *const kDecoStopsText;
extern NSString *const kMidAscText;
extern NSString *const kInitialAscText;

/**
 * Metric or Imperial string literal
 */
extern NSString *const kMetricTag;
extern NSString *const kLitersTag;
extern NSString *const kImperialTag;
extern NSString *const kCubicFeetTag;

/**
 * Contant string descriptors for filling and
 * accessing the diveProfile dictionary
 */
extern NSString *const kN2HalfLifeDictKey;
extern NSString *const kHeHalfLifeDictKey;

extern NSString *const kZHL_l6A_N2_a_DictKey;
extern NSString *const kZHL_l6A_N2_b_DictKey;
extern NSString *const kZHL_l6A_He_a_DictKey;
extern NSString *const kZHL_16A_He_b_DictKey;

extern NSString *const kZHL_l6B_N2_a_DictKey;
extern NSString *const kZHL_l6B_N2_b_DictKey;
extern NSString *const kZHL_l6B_He_a_DictKey;
extern NSString *const kZHL_16B_He_b_DictKey;

extern NSString *const kZHL_l6C_N2_a_DictKey;
extern NSString *const kZHL_16C_N2_b_DictKey;
extern NSString *const kZHL_l6C_He_a_DictKey;
extern NSString *const kZHL_16C_He_b_DictKey;


/**
 * Constantants used for selection of the correct 
 *  standard gas
 */
extern float const k32percent;
extern float const k21percent;
extern float const k18percent;
extern float const k15percent;
extern float const k12percent;
extern float const k10percent;

// Meters
extern int const k32percentMOD_M;
extern int const k21percentMOD_M;
extern int const k18percentMOD_M;
extern int const k15percentMOD_M;
extern int const k12percentMOD_M;
extern int const k10percentMOD_M;

// Feet
extern int const k32percentMOD_I;
extern int const k21percentMOD_I;
extern int const k18percentMOD_I;
extern int const k15percentMOD_I;
extern int const k12percentMOD_I;
extern int const k10percentMOD_I;

extern NSString *const k32percentText;
extern NSString *const k21percentText;
extern NSString *const k18percentText;
extern NSString *const k15percentText;
extern NSString *const k12percentText;
extern NSString *const k10percentText;


typedef enum segmentType{
    DESCENT = 0,
    BOTTOM  = 1,
    ASCENT  = 2
} diveSegment;

/***
 * Pressure measurements
 */

extern double const kSchreinerWVPInMSW;
extern double const kSchreinerWVPInFSW;
extern double const kUSNWVPInMSW;
extern double const kUSNWVPInFSW;
extern double const kBuhlmannWVPInMSW;
extern double const kBuhlmannWVPInFSW;

extern const double kbar;
extern const double kMSW;
extern const double kWaterVaporPressureMSW;
extern const double kppN2AtSeaLevelInBar;

extern const int kNumberOfCompartments;
/***
 * Halflife constants for Nitrogen
 */
extern double const kHalfLifeN2Cmp0;
extern double const kHalfLifeN2Cmp1;
extern double const kHalfLifeN2Cmp2;
extern double const kHalfLifeN2Cmp3;
extern double const kHalfLifeN2Cmp4;
extern double const kHalfLifeN2Cmp5;
extern double const kHalfLifeN2Cmp6;
extern double const kHalfLifeN2Cmp7;
extern double const kHalfLifeN2Cmp8;
extern double const kHalfLifeN2Cmp9;
extern double const kHalfLifeN2Cmp10;
extern double const kHalfLifeN2Cmp11;
extern double const kHalfLifeN2Cmp12;
extern double const kHalfLifeN2Cmp13;
extern double const kHalfLifeN2Cmp14;
extern double const kHalfLifeN2Cmp15;


/***
 * Halflife constants for Helium
 */
extern double const kHalfLifeHeCmp0;
extern double const kHalfLifeHeCmp1;
extern double const kHalfLifeHeCmp2;
extern double const kHalfLifeHeCmp3;
extern double const kHalfLifeHeCmp4;
extern double const kHalfLifeHeCmp5;
extern double const kHalfLifeHeCmp6;
extern double const kHalfLifeHeCmp7;
extern double const kHalfLifeHeCmp8;
extern double const kHalfLifeHeCmp9;
extern double const kHalfLifeHeCmp10;
extern double const kHalfLifeHeCmp11;
extern double const kHalfLifeHeCmp12;
extern double const kHalfLifeHeCmp13;
extern double const kHalfLifeHeCmp14;
extern double const kHalfLifeHeCmp15;

/***
 * Buhlman ZH-l6A Nitrogen a coefficients
 */
extern double const kZHL_16A_N2aCmp0;
extern double const kZHL_16A_N2aCmp1;
extern double const kZHL_16A_N2aCmp2;
extern double const kZHL_16A_N2aCmp3;
extern double const kZHL_16A_N2aCmp4;
extern double const kZHL_16A_N2aCmp5;
extern double const kZHL_16A_N2aCmp6;
extern double const kZHL_16A_N2aCmp7;
extern double const kZHL_16A_N2aCmp8;
extern double const kZHL_16A_N2aCmp9;
extern double const kZHL_16A_N2aCmp10;
extern double const kZHL_16A_N2aCmp11;
extern double const kZHL_16A_N2aCmp12;
extern double const kZHL_16A_N2aCmp13;
extern double const kZHL_16A_N2aCmp14;
extern double const kZHL_16A_N2aCmp15;

/***
 * Buhlman ZH-l6A Nitrogen b coefficients
 */
extern double const kZHL_16A_N2bCmp0;
extern double const kZHL_16A_N2bCmp1;
extern double const kZHL_16A_N2bCmp2;
extern double const kZHL_16A_N2bCmp3;
extern double const kZHL_16A_N2bCmp4;
extern double const kZHL_16A_N2bCmp5;
extern double const kZHL_16A_N2bCmp6;
extern double const kZHL_16A_N2bCmp7;
extern double const kZHL_16A_N2bCmp8;
extern double const kZHL_16A_N2bCmp9;
extern double const kZHL_16A_N2bCmp10;
extern double const kZHL_16A_N2bCmp11;
extern double const kZHL_16A_N2bCmp12;
extern double const kZHL_16A_N2bCmp13;
extern double const kZHL_16A_N2bCmp14;
extern double const kZHL_16A_N2bCmp15;

/***
 * Buhlman ZH-l6A Helium a coefficients
 */
extern double const kZHL_16A_HeACmp0;
extern double const kZHL_16A_HeACmp1;
extern double const kZHL_16A_HeACmp2;
extern double const kZHL_16A_HeACmp3;
extern double const kZHL_16A_HeACmp4;
extern double const kZHL_16A_HeACmp5;
extern double const kZHL_16A_HeACmp6;
extern double const kZHL_16A_HeACmp7;
extern double const kZHL_16A_HeACmp8;
extern double const kZHL_16A_HeACmp9;
extern double const kZHL_16A_HeACmp10;
extern double const kZHL_16A_HeACmp11;
extern double const kZHL_16A_HeACmp12;
extern double const kZHL_16A_HeACmp13;
extern double const kZHL_16A_HeACmp14;
extern double const kZHL_16A_HeACmp15;

/***
 * Buhlman ZH-lA Helium b coefficients
 */
extern double const kZHL_16A_HeBCmp0;
extern double const kZHL_16A_HeBCmp1;
extern double const kZHL_16A_HeBCmp2;
extern double const kZHL_16A_HeBCmp3;
extern double const kZHL_16A_HeBCmp4;
extern double const kZHL_16A_HeBCmp5;
extern double const kZHL_16A_HeBCmp6;
extern double const kZHL_16A_HeBCmp7;
extern double const kZHL_16A_HeBCmp8;
extern double const kZHL_16A_HeBCmp9;
extern double const kZHL_16A_HeBCmp10;
extern double const kZHL_16A_HeBCmp11;
extern double const kZHL_16A_HeBCmp12;
extern double const kZHL_16A_HeBCmp13;
extern double const kZHL_16A_HeBCmp14;
extern double const kZHL_16A_HeBCmp15;

/***
 * Buhlman ZH-lB Nitrogen a coefficients
 */
extern double const kZHL_16B_N2aCmp0;
extern double const kZHL_16B_N2aCmp1;
extern double const kZHL_16B_N2aCmp2;
extern double const kZHL_16B_N2aCmp3;
extern double const kZHL_16B_N2aCmp4;
extern double const kZHL_16B_N2aCmp5;
extern double const kZHL_16B_N2aCmp6;
extern double const kZHL_16B_N2aCmp7;
extern double const kZHL_16B_N2aCmp8;
extern double const kZHL_16B_N2aCmp9;
extern double const kZHL_16B_N2aCmp10;
extern double const kZHL_16B_N2aCmp11;
extern double const kZHL_16B_N2aCmp12;
extern double const kZHL_16B_N2aCmp13;
extern double const kZHL_16B_N2aCmp14;
extern double const kZHL_16B_N2aCmp15;

/***
 * Buhlman ZH-lB Nitrogen b coefficients
 */
extern double const kZHL_16B_N2bCmp0;
extern double const kZHL_16B_N2bCmp1;
extern double const kZHL_16B_N2bCmp2;
extern double const kZHL_16B_N2bCmp3;
extern double const kZHL_16B_N2bCmp4;
extern double const kZHL_16B_N2bCmp5;
extern double const kZHL_16B_N2bCmp6;
extern double const kZHL_16B_N2bCmp7;
extern double const kZHL_16B_N2bCmp8;
extern double const kZHL_16B_N2bCmp9;
extern double const kZHL_16B_N2bCmp10;
extern double const kZHL_16B_N2bCmp11;
extern double const kZHL_16B_N2bCmp12;
extern double const kZHL_16B_N2bCmp13;
extern double const kZHL_16B_N2bCmp14;
extern double const kZHL_16B_N2bCmp15;

/***
 * Buhlman ZH-lB Helium a coefficients
 */
extern double const kZHL_16B_HeaCmp0;
extern double const kZHL_16B_HeaCmp1;
extern double const kZHL_16B_HeaCmp2;
extern double const kZHL_16B_HeaCmp3;
extern double const kZHL_16B_HeaCmp4;
extern double const kZHL_16B_HeaCmp5;
extern double const kZHL_16B_HeaCmp6;
extern double const kZHL_16B_HeaCmp7;
extern double const kZHL_16B_HeaCmp8;
extern double const kZHL_16B_HeaCmp9;
extern double const kZHL_16B_HeaCmp10;
extern double const kZHL_16B_HeaCmp11;
extern double const kZHL_16B_HeaCmp12;
extern double const kZHL_16B_HeaCmp13;
extern double const kZHL_16B_HeaCmp14;
extern double const kZHL_16B_HeaCmp15;

/***
 * Buhlman ZH-lB Helium b coefficients
 */
extern double const kZHL_16B_HebCmp0;
extern double const kZHL_16B_HebCmp1;
extern double const kZHL_16B_HebCmp2;
extern double const kZHL_16B_HebCmp3;
extern double const kZHL_16B_HebCmp4;
extern double const kZHL_16B_HebCmp5;
extern double const kZHL_16B_HebCmp6;
extern double const kZHL_16B_HebCmp7;
extern double const kZHL_16B_HebCmp8;
extern double const kZHL_16B_HebCmp9;
extern double const kZHL_16B_HebCmp10;
extern double const kZHL_16B_HebCmp11;
extern double const kZHL_16B_HebCmp12;
extern double const kZHL_16B_HebCmp13;
extern double const kZHL_16B_HebCmp14;
extern double const kZHL_16B_HebCmp15;

/***
 * Buhlman ZH-lC Nitrogen a coefficients
 */
extern double const kZHL_1C_N2aCmp0;
extern double const kZHL_1C_N2aCmp1;
extern double const kZHL_1C_N2aCmp2;
extern double const kZHL_1C_N2aCmp3;
extern double const kZHL_1C_N2aCmp4;
extern double const kZHL_1C_N2aCmp5;
extern double const kZHL_1C_N2aCmp6;
extern double const kZHL_1C_N2aCmp7;
extern double const kZHL_1C_N2aCmp8;
extern double const kZHL_1C_N2aCmp9;
extern double const kZHL_1C_N2aCmp10;
extern double const kZHL_1C_N2aCmp11;
extern double const kZHL_1C_N2aCmp12;
extern double const kZHL_1C_N2aCmp13;
extern double const kZHL_1C_N2aCmp14;
extern double const kZHL_1C_N2aCmp15;

/***
 * Buhlman ZH-lC Nitrogen b coefficients
 */
extern double const kZHL_1C_N2bCmp0;
extern double const kZHL_1C_N2bCmp1;
extern double const kZHL_1C_N2bCmp2;
extern double const kZHL_1C_N2bCmp3;
extern double const kZHL_1C_N2bCmp4;
extern double const kZHL_1C_N2bCmp5;
extern double const kZHL_1C_N2bCmp6;
extern double const kZHL_1C_N2bCmp7;
extern double const kZHL_1C_N2bCmp8;
extern double const kZHL_1C_N2bCmp9;
extern double const kZHL_1C_N2bCmp10;
extern double const kZHL_1C_N2bCmp11;
extern double const kZHL_1C_N2bCmp12;
extern double const kZHL_1C_N2bCmp13;
extern double const kZHL_1C_N2bCmp14;
extern double const kZHL_1C_N2bCmp15;

